﻿using System;
using System.Collections.Generic;
using System.Text;
using AF_ORM.CORE;
using System.Data;
using DevComponents.DotNetBar.Controls;
namespace QuanLyThietBi.Manager
{
                

    public class TBL_DonViTinhManager:QuanLyThietBi.ManagerBase.TBL_DonViTinhManagerBase
    {
            public static TBL_DonViTinhManager CreateInstant()
            {
                return new TBL_DonViTinhManager();
            }

            public void HienThiComboBoxDonViTinh(ComboBoxEx cb)
            {
                DataTable dtDonViTinh = TBL_DonViTinhManager.CreateInstant().SelectAll();
                DataRow dr = dtDonViTinh.NewRow();
                dr["MaDonVi"] = "None";
                dr["TenDonVi"] = "---Chọn---";
                dtDonViTinh.Rows.InsertAt(dr, 0);
                cb.DataSource = dtDonViTinh;
                cb.DisplayMember = "TenDonVi";
                cb.ValueMember = "MaDonVi";
            }


    }
}
                    
